package com.woniuxy.cloud.carl.car.client;


import com.woniuxy.cloud.carl.car.client.param.AddBrandParam;
import com.woniuxy.cloud.carl.car.client.param.AddCarParam;
import com.woniuxy.cloud.carl.car.client.param.AddSortParam;
import com.woniuxy.cloud.carl.car.client.param.AddStyleParam;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "carManageClient",name="car",path="car")
public interface CarManageClient {

    @PostMapping("car")
    public Result insertCar(@RequestBody AddCarParam param);

    @PostMapping("brand")
    public Result insertBrand(@RequestBody AddBrandParam param);

    @PostMapping("carStyle")
    public Result insertStyle(@RequestBody AddStyleParam param);

    @PostMapping("carSort")
    public Result insertSort(@RequestBody AddSortParam param);

    @PostMapping("productYear/{yearName}")
    public Result insertYear(@PathVariable("yearName") String yearName);



}
